package com.snake;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * Created by Administrator on 2018/5/5 0005.
 */
public class WebDriverUtil {

    public  static boolean elementExist (WebDriver driver,By Locator ) {
        try {
            driver.findElement(Locator);
            return true;
        } catch (org.openqa.selenium.NoSuchElementException ex) {
            return false;
        }
    }


}
